home *** CD-ROM | disk | FTP | other *** search
/ Shareware Extravaganza - Disc 4 / Shareware Extravaganza - Over 25,000 Programs (The Ultimate Shareware Company)(Disc 4 of 4)(1993).iso / cad / ml.zip / ML.LSP
Text File  |  1990-04-09  |  2KB  |  72 lines

  1. ;ML.LSP
  2.  
  3. ;Dennis Shinn
  4. ;17411 N.E. 13th Pl.
  5. ;Bellevue, Wa.  98008
  6. ;(206) 641-6946
  7.  
  8. ;Editing utility that moves all objects on a single layer
  9. ;maintaining their original elevation, but allowing osnap
  10. ;selection of the <to> point on any other object, regardless
  11. ;of that objects <z> coordinate elevation.
  12.  
  13. ;Example of usage: given a multi story building with all floor
  14. ;plans drawn in the same drawing file and at their respective
  15. ;elevations, ML.LSP allows moving all wall lines on one floor
  16. ;by picking an entity on that floor's wall line layer, picking
  17. ;the <from> osnap override on that layer, then picking any
  18. ;other object with any other osnap override as the <to> point 
  19. ;as a means of precisely controlling the placement of all the
  20. ;original objects yet maintaing their proper elevation.
  21.  
  22. ;***********   N  O  T  E  *********
  23.  
  24. ;One word of caution: The elevation <z coordinate> of the first
  25. ;picked point is used in the construction of the 3D point
  26. ;list for the final <to> point.  Picking a <from> point using
  27. ;an object on other than the target layer will move all the
  28. ;objects to the elevation of the <from> point!!!  This could
  29. ;be useful in certain situations but is obviously disastrous
  30. ;if that's not the desired result!
  31.  
  32. ;This program is released in the public domain.  Anyone is free
  33. ;to use it, modify it to fit their needs, and to pass it on to ;others who might benifit.  The only stipulation is that if you
  34. ;you do pass this code to others that it be in its original
  35. ;form.
  36.  
  37. ;Possible enhancement(s):
  38. :Provide looping routine to collect more than one layer of
  39. ;  objects to be moved.
  40.  
  41.  
  42. (DeFun C:ML ()
  43.   (GraphScr)
  44.   (Prompt "\nPick object on layer to be moved: ")
  45.   (SetQ ss
  46.     (Cdr
  47.       (Assoc 8 
  48.         (EntGet 
  49.           (Car
  50.             (EntSel)
  51.           )
  52.         )
  53.       )
  54.     )
  55.     ss (SsGet "x" (List (Cons 8  ss)))
  56.     p1 (GetPoint "\nFrom point: ")
  57.     p2 (GetPoint p1 "\nTo point: ")
  58.   )
  59.   (Command
  60.     ".MOVE"
  61.      ss
  62.      ""
  63.      p1
  64.      (List
  65.        (Car p2)
  66.        (Cadr p2)
  67.        (Caddr p1)
  68.       )
  69.   )
  70.   (Princ);end of ML.Lsp
  71. )
  72.